from nicegui import ui

class LoginView:
    def __init__(self):
        # 页面标题，全球影像采集系统
        ui.page_title("全球影像采集系统")
        
        # background img imgs/background.jpg
        ui.add_css("body {background-image: url('imgs/background.jpg');}")
        with ui.row().classes("w-full").style("margin-top: 5%;"):
            ui.markdown("# 全球影像采集系统").classes("w-full text-center text-white")
        with ui.card().classes("w-1/4 mx-auto").style("height: 50%;"):
            ui.label("请登录").style("font-size: 20px;").classes("mx-auto")
            ui.input("邮箱").classes("w-full")
            ui.input("密码").classes("w-full")
            with ui.row():
                ui.button("登录")
                ui.button("注册").on_click(lambda: ui.navigate.to("register"))